'\" t
.TH "BOOTCTL" "1" "" "systemd 249" "bootctl"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
bootctl \- Control EFI firmware boot settings and manage boot loader
.SH "SYNOPSIS"
.HP \w'\fBbootctl\fR\ 'u
\fBbootctl\fR [OPTIONS...] {COMMAND}
.SH "DESCRIPTION"
.PP
\fBbootctl\fR
can check the EFI firmware and boot loader status, list and manage available boot loaders and boot loader entries, and install, update, or remove the
\fBsystemd-boot\fR(7)
boot loader on the current system\&.
.SH "GENERIC EFI FIRMWARE/BOOT LOADER COMMANDS"
.PP
These commands are available on any EFI system, regardless of the boot loader used\&.
.PP
\fBstatus\fR
.RS 4
Shows brief information about the system firmware, the boot loader that was used to boot the system, the boot loaders currently available in the ESP, the boot loaders listed in the firmware\*(Aqs list of boot loaders and the current default boot loader entry\&. If no command is specified, this is the implied default\&.
.RE
.PP
\fBreboot\-to\-firmware\fR [\fIBOOL\fR]
.RS 4
Query or set the "Reboot\-Into\-Firmware\-Setup" flag of the EFI firmware\&. Takes a boolean argument which controls whether to show the firmware setup on next system reboot\&. If the argument is omitted shows the current status of the flag, or whether the flag is supported\&. This controls the same flag as
\fBsystemctl reboot \-\-firmware\-setup\fR, but is more low\-level and allows setting the flag independently from actually requesting a reboot\&.
.RE
.PP
\fBsystemd\-efi\-options\fR [\fISTRING\fR]
.RS 4
When called without the optional argument, prints the current value of the
"SystemdOptions"
EFI variable\&. When called with an argument, sets the variable to that value\&. See
\fBsystemd\fR(1)
for the meaning of that variable\&.
.RE
.SH "BOOT LOADER SPECIFICATION COMMANDS"
.PP
These commands are available for all boot loaders that implement the
\m[blue]\fBBoot Loader Specification\fR\m[]\&\s-2\u[1]\d\s+2
and/or the
\m[blue]\fBBoot Loader Interface\fR\m[]\&\s-2\u[2]\d\s+2, such as
\fBsystemd\-boot\fR\&.
.PP
\fBlist\fR
.RS 4
Shows all available boot loader entries implementing the
\m[blue]\fBBoot Loader Specification\fR\m[]\&\s-2\u[1]\d\s+2, as well as any other entries discovered or automatically generated by a boot loader implementing the
\m[blue]\fBBoot Loader Interface\fR\m[]\&\s-2\u[2]\d\s+2\&.
.RE
.PP
\fBset\-default\fR \fIID\fR, \fBset\-oneshot\fR \fIID\fR
.RS 4
Sets the default boot loader entry\&. Takes a single boot loader entry ID string as argument\&. The
\fBset\-oneshot\fR
command will set the default entry only for the next boot, the
\fBset\-default\fR
will set it persistently for all future boots\&.
Optionally, the boot loader entry ID may be specified as one of:
\fB@default\fR,
\fB@oneshot\fR
or
\fB@current\fR, which correspond to the current default boot loader entry for all future boots, the current default boot loader entry for the next boot, and the currently booted boot loader entry\&. These special IDs are resolved to the current values of the EFI variables
\fILoaderEntryDefault\fR,
\fILoaderEntryOneShot\fR
and
\fILoaderEntrySelected\fR, see
\m[blue]\fBBoot Loader Specification\fR\m[]\&\s-2\u[1]\d\s+2
for details\&. These special IDs are primarily useful as a quick way to persistently make the currently booted boot loader entry the default choice, or to upgrade the default boot loader entry for the next boot to the default boot loader entry for all future boots, but may be used for other operations too\&. When an empty string ("") is specified as an ID, then the corresponding EFI variable will be unset\&.
.RE
.SH "SYSTEMD\-BOOT COMMANDS"
.PP
These commands manage the
\fBsystemd\-boot\fR
EFI boot loader, and do not work in conjunction with other boot loaders\&.
.PP
\fBinstall\fR
.RS 4
Installs
\fBsystemd\-boot\fR
into the EFI system partition\&. A copy of
\fBsystemd\-boot\fR
will be stored as the EFI default/fallback loader at
\fIESP\fR/EFI/BOOT/BOOT*\&.EFI\&. The boot loader is then added to the top of the firmware\*(Aqs boot loader list\&.
.RE
.PP
\fBupdate\fR
.RS 4
Updates all installed versions of
\fBsystemd-boot\fR(7), if the available version is newer than the version installed in the EFI system partition\&. This also includes the EFI default/fallback loader at
\fIESP\fR/EFI/BOOT/BOOT*\&.EFI\&. The boot loader is then added to end of the firmware\*(Aqs boot loader list if missing\&.
.RE
.PP
\fBremove\fR
.RS 4
Removes all installed versions of
\fBsystemd\-boot\fR
from the EFI system partition and the firmware\*(Aqs boot loader list\&.
.RE
.PP
\fBis\-installed\fR
.RS 4
Checks whether
\fBsystemd\-boot\fR
is installed in the ESP\&. Note that a single ESP might host multiple boot loaders; this hence checks whether
\fBsystemd\-boot\fR
is one (of possibly many) installed boot loaders \(em and neither whether it is the default nor whether it is registered in any EFI variables\&.
.RE
.PP
\fBrandom\-seed\fR
.RS 4
Generates a random seed and stores it in the EFI System Partition, for use by the
\fBsystemd\-boot\fR
boot loader\&. Also, generates a random \*(Aqsystem token\*(Aq and stores it persistently as an EFI variable, if one has not been set before\&. If the boot loader finds the random seed in the ESP and the system token in the EFI variable it will derive a random seed to pass to the OS and a new seed to store in the ESP from the combination of both\&. The random seed passed to the OS is credited to the kernel\*(Aqs entropy pool by the system manager during early boot, and permits userspace to boot up with an entropy pool fully initialized very early on\&. Also see
\fBsystemd-boot-system-token.service\fR(8)\&.
.sp
See
\m[blue]\fBRandom Seeds\fR\m[]\&\s-2\u[3]\d\s+2
for further information\&.
.RE
.SH "OPTIONS"
.PP
The following options are understood:
.PP
\fB\-\-esp\-path=\fR
.RS 4
Path to the EFI System Partition (ESP)\&. If not specified,
/efi/,
/boot/, and
/boot/efi/
are checked in turn\&. It is recommended to mount the ESP to
/efi/, if possible\&.
.RE
.PP
\fB\-\-boot\-path=\fR
.RS 4
Path to the Extended Boot Loader partition, as defined in the
\m[blue]\fBBoot Loader Specification\fR\m[]\&\s-2\u[1]\d\s+2\&. If not specified,
/boot/
is checked\&. It is recommended to mount the Extended Boot Loader partition to
/boot/, if possible\&.
.RE
.PP
\fB\-p\fR, \fB\-\-print\-esp\-path\fR
.RS 4
This option modifies the behaviour of
\fBstatus\fR\&. Only prints the path to the EFI System Partition (ESP) to standard output and exits\&.
.RE
.PP
\fB\-x\fR, \fB\-\-print\-boot\-path\fR
.RS 4
This option modifies the behaviour of
\fBstatus\fR\&. Only prints the path to the Extended Boot Loader partition if it exists, and the path to the ESP otherwise to standard output and exit\&. This command is useful to determine where to place boot loader entries, as they are preferably placed in the Extended Boot Loader partition if it exists and in the ESP otherwise\&.
.sp
Boot Loader Specification Type #1 entries should generally be placed in the directory
"$(bootctl \-x)/loader/entries/"\&. Existence of that directory may also be used as indication that boot loader entry support is available on the system\&. Similarly, Boot Loader Specification Type #2 entries should be placed in the directory
"$(bootctl \-x)/EFI/Linux/"\&.
.sp
Note that this option (similar to the
\fB\-\-print\-booth\-path\fR
option mentioned above), is available independently from the boot loader used, i\&.e\&. also without
\fBsystemd\-boot\fR
being installed\&.
.RE
.PP
\fB\-\-no\-variables\fR
.RS 4
Do not touch the firmware\*(Aqs boot loader list stored in EFI variables\&.
.RE
.PP
\fB\-\-graceful\fR
.RS 4
Ignore failure when the EFI System Partition cannot be found, or when EFI variables cannot be written\&. Currently only applies to random seed operations\&.
.RE
.PP
\fB\-\-make\-machine\-id\-directory=yes|no|auto\fR
.RS 4
Control creation and deletion of the top\-level machine ID directory on the file system containing boot loader entries (i\&.e\&. beneath the file system returned by
\fB\-\-print\-boot\-path\fR
above) during
\fBinstall\fR
and
\fBremove\fR, respectively\&.
"auto"
is equivalent to
"yes"
if
/etc/machine\-id
resides on a filesystem other than tmpfs and
"no"
otherwise (in the latter case the machine ID is likely transient and hence should not be used persistently in the ESP)\&. Defaults to
"auto"\&. See
\fBmachine-id\fR(5)
for details about the machine ID concept and file\&.
.sp
Overriding this may be desirable to hide the machine ID from the (unencrypted) ESP, configure a
\fBkernel-install\fR(8)
script, or, conversely, commit a transient machine ID\&.
.sp
The top\-level machine ID directory is useful to allow smooth multi\-boot installations: each installed OS instance will have a different machine ID and thus a separate directory to place its boot\-time resources in\&. If this feature is turned off with this option, care needs to be taken that multiple OS instances do not place conflicting files on the shared ESP and Extended Boot Loader Partitions, or that multiple OS instances are not possible\&.
.RE
.PP
\fB\-\-no\-pager\fR
.RS 4
Do not pipe output into a pager\&.
.RE
.PP
\fB\-h\fR, \fB\-\-help\fR
.RS 4
Print a short help text and exit\&.
.RE
.PP
\fB\-\-version\fR
.RS 4
Print a short version string and exit\&.
.RE
.SH "EXIT STATUS"
.PP
On success, 0 is returned, a non\-zero failure code otherwise\&.
.SH "ENVIRONMENT"
.PP
If
\fI$SYSTEMD_RELAX_ESP_CHECKS=1\fR
is set the validation checks for the ESP are relaxed, and the path specified with
\fB\-\-esp\-path=\fR
may refer to any kind of file system on any kind of partition\&.
.PP
Similarly,
\fI$SYSTEMD_RELAX_XBOOTLDR_CHECKS=1\fR
turns off some validation checks for the Extended Boot Loader partition\&.
.SH "SEE ALSO"
.PP
\fBsystemd-boot\fR(7),
\m[blue]\fBBoot Loader Specification\fR\m[]\&\s-2\u[1]\d\s+2,
\m[blue]\fBBoot Loader Interface\fR\m[]\&\s-2\u[2]\d\s+2,
\fBsystemd-boot-system-token.service\fR(8)
.SH "NOTES"
.IP " 1." 4
Boot Loader Specification
.RS 4
\%https://systemd.io/BOOT_LOADER_SPECIFICATION
.RE
.IP " 2." 4
Boot Loader Interface
.RS 4
\%https://systemd.io/BOOT_LOADER_INTERFACE
.RE
.IP " 3." 4
Random Seeds
.RS 4
\%https://systemd.io/RANDOM_SEEDS
.RE
